package net.xmmpp.uc.im.common.model;

import java.io.Serializable;
import java.util.Objects;

public class MsgLog implements Serializable {

    private String uid;
    private Integer type;
    private Long ver;
    private String gid;
    private Long gvr;
    private Long ts;


    public String getUid() {
        return uid;
    }

    public void setUid(String uid) {
        this.uid = uid;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public Long getVer() {
        return ver;
    }

    public void setVer(Long ver) {
        this.ver = ver;
    }


    public String getGid() {
        return gid;
    }

    public void setGid(String gid) {
        this.gid = gid;
    }


    public Long getGvr() {
        return gvr;
    }

    public void setGvr(Long gvr) {
        this.gvr = gvr;
    }

    public Long getTs() {
        return ts;
    }

    public void setTs(Long ts) {
        this.ts = ts;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        MsgLog msgLog = (MsgLog) o;
        return uid.equals(msgLog.uid) && type.equals(msgLog.type) && ver.equals(msgLog.ver) && gid.equals(msgLog.gid) && gvr.equals(msgLog.gvr) && ts.equals(msgLog.ts);
    }

    @Override
    public int hashCode() {
        return Objects.hash(uid, type, ver, gid, gvr, ts);
    }

    @Override
    public String toString() {
        StringBuilder stringBuilder = new StringBuilder();
        stringBuilder.append("MsgLog{")
                .append("uid='")
                .append(uid)
                .append('\'')
                .append( ", type=" )
                .append(type)
                .append(", ver=")
                .append(ver)
                .append(", gid=")
                .append(gid)
                .append(", gvr=")
                .append(gvr)
                .append(", ts=")
                .append(ts)
                .append('}');

        return  stringBuilder.toString();
    }
}
